Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(routing): support promise in message repo #959

Conversation

TimoGlastra
Copy link
Contributor

Signed-off-by: Timo Glastra [email protected]

@TimoGlastra TimoGlastra requested a review from a team as a code owner July 21, 2022 20:40
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2022

Codecov Report

Merging #959 (805e5b3) into main (3e415d8) will not change coverage.
The diff coverage is 20.00%.

@@           Coverage Diff           @@
##             main     #959   +/-   ##
=======================================
  Coverage   87.76%   87.76%           
=======================================
  Files         475      475           
  Lines       11417    11417           
  Branches     1804     1804           
=======================================
  Hits        10020    10020           
  Misses       1393     1393           
  Partials        4        4           
Impacted Files Coverage Δ
packages/core/src/agent/MessageSender.ts 84.61% <0.00%> (ø)
...c/modules/routing/services/MessagePickupService.ts 83.33% <33.33%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

takeFromQueue(connectionId: string, limit?: number): EncryptedMessage[]
add(connectionId: string, payload: EncryptedMessage): void
takeFromQueue(connectionId: string, limit?: number): EncryptedMessage[] | Promise<EncryptedMessage[]>
add(connectionId: string, payload: EncryptedMessage): void | Promise<void>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this still be sync? I thought all repository operations are async.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message repository is a special type of repository. We should probably rework this in the near future if we want to start using AFJ as a mediator. For now this makes it possible to make a custom repo implementation based on the indy wallet storage (which is indeed async).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably be called something like queue (as that's what is is based on the methods e.g. takeFromQueue)

@TimoGlastra TimoGlastra enabled auto-merge (squash) July 24, 2022 10:04
@TimoGlastra TimoGlastra merged commit 79c5d8d into openwallet-foundation:main Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants